package us.icitap.commandcenter.business.ejb;

import java.io.ByteArrayInputStream;
import java.util.List;

import javax.ejb.Local;
import javax.jms.ConnectionFactory;

import com.vaadin.server.StreamResource.StreamSource;

import us.icitap.commandcenter.business.AppUser;
import us.icitap.commandcenter.business.CallActionEnum;
import us.icitap.commandcenter.business.CallRolesEnum;
import us.icitap.commandcenter.business.ejb.persistence.Call;
import us.icitap.commandcenter.business.ejb.persistence.CallStatusEnum;
import us.icitap.commandcenter.business.ejb.persistence.CommandCenter;
import us.icitap.commandcenter.business.ejb.persistence.Dispatcher;
import us.icitap.timsportal.business.SimpleUser;
import us.icitap.timsportal.entity.User;
import us.icitap.utils.Result;


@Local
public interface IAppStatelessBean {

	Result<List<Call>> getWvCallList(List<Dispatcher> dispatchers);

	Result<List<Call>> getClosedCallList(List<Dispatcher> dispatchers);
	
	Result<Call> startVerification(Call call);


	Result<Call> generateUniqueNumber(Call call);

	ConnectionFactory getConnectionFactory();

	Result<List<Call>> getOperatorCallList(String username);

	Result<AppUser> login(SimpleUser u);
	
	public Result<List<Dispatcher>> getDispatchers(CommandCenter cc);

	ICallPersistBean getCallPersistBean();

	void sendDailyCallReport();

	Result<StreamSource> generateExcelFromList(List<Call> callList);

	Result<StreamSource> generateCallPdf(Call call, String printingUser);

	Result<List<Call>> getNewCallListForSupervisor(CommandCenter commandCenter);

	Result<List<Call>> getInitialNewCallList(CommandCenter commandCenter);

	Result<List<Call>> getInitialNewCallList(List<Dispatcher> dispatchers);

	Result<Call> addNewCall(Call call, CallRolesEnum callRolesEnum);

	Result<Call> closeVerification(Call call, CallRolesEnum callRolesEnum);

	Result<Call> updateCallInformation(Call call, CallRolesEnum callRolesEnum);

	void sendMessage(Call call, CallActionEnum callActionEnum,
			boolean sendToOperator, boolean sendToDispatcher,
			boolean sendToSupervisor);

	Result<Call> changeDispatcher(Call call, CallRolesEnum callRolesEnum);

	Result<AppUser> devLogin();
	
}
